<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			function query(){
				//请求用户
				let promise = new Promise((res,rej)=>{
					setTimeout(function(){
						//请求用户成功
						res("用户请求成功");
					},2000);
				});
				
				//获取结果
				promise.then(res=>{
					console.log("请求用户结果：",res);
					//模拟查询权限
					
					return new Promise(res=>{
						setTimeout(function(){
							res("权限请求成功");
						},3000);
					});
				})
				.then(res=>{
					console.log("权限",res)
				})
			}
			
			query();
		</script>
	</head>
	<body>
	</body>
</html>